import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listFdSubjects(query) {
  return request({
    url: '/subjects/fdSubjects/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getFdSubjects(id) {
  return request({
    url: '/subjects/fdSubjects/' + id,
    method: 'get'
  })
}

// 保存【请填写功能名称】
export function saveFdSubjects(data) {
  return request({
    url: '/subjects/fdSubjects/save',
    method: 'post',
    data: data
  })
}

// 删除【请填写功能名称】
export function delFdSubjects(id) {
  return request({
    url: '/subjects/fdSubjects/' + id,
    method: 'delete'
  })
}

// 删除tree
export function delTree(id) {
  return request({
    url: '/subjects/fdSubjects/deleteDetails/' + id,
    method: 'delete'
  })
}

// 导出【请填写功能名称】
export function exportFdSubjects(query) {
  return request({
    url: '/subjects/fdSubjects/export',
    method: 'get',
    params: query
  })
}

// 根据类型获取下拉列表  (例如 基金的在传递给后台基金的科目类型 可以获得对应的下拉)
export function fdSubjectSelectByType(remark, typeIdentifier) {
  const data = {
    remark,
    typeIdentifier
  }
  return request({
    url: '/subjects/fdSubjects/fdSubjectSelectByType',
    method: 'post',
    data: data
  })
}

